﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcApplication1.Models.Liga>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Ligas</h2>

    <ul>
        <% foreach (var liga in Model) { %>
            <li>
            <h4><%= Html.ActionLink(liga.Nombre, "Details", new { id = liga.IDLiga })%>    
            <% if(ViewData["Usuario"].Equals("admin") & !liga.Inicalizada){ %>
                | <%= Html.ActionLink("Inicializar", "Inicializar","Ligas", new { id = liga.IDLiga },null)%> 
            <%} %>
            </h4>
            </li>
        <% } %>
    </ul>

    <ul>
    <%  if (ViewData["Usuario"].Equals("admin")){ %>
        <%= Html.ActionLink("Crear Liga", "Create") %>
    <%} %>
     
     </ul>

</asp:Content>

